package com.sqstudio.exercise.chapter1_2
{
	import flash.events.Event;
	
	import org.papervision3d.objects.primitives.Sphere;
	import org.papervision3d.view.BasicView;
	[SWF(width="800",height="600")]
	public class ExtendsBasicView extends BasicView
	{
		private var sphere:Sphere;
		public function ExtendsBasicView(viewportWidth:Number=800, viewportHeight:Number=600, scaleToStage:Boolean=true, interactive:Boolean=false, cameraType:String="Target")
		{
			super(viewportWidth, viewportHeight, scaleToStage, interactive, cameraType);
			stage.frameRate = 40;
			this.sphere = new Sphere();
			scene.addChild(this.sphere);
			this.startRendering();
		}
		
		override protected function onRenderTick(event:Event=null):void
		{
			this.sphere.rotationY ++;
			super.onRenderTick(event);
		}
	}
}